home *** CD-ROM | disk | FTP | other *** search
-
- ***************************
- ** TLPatch V1.0 **
- *** Richard Sheppard - 1991 ***
- ** Toronto, Canada **
- ***************************
-
- A utility to allow corrections in pronunciation for programs
- that use the Translate() function. It is offered as "freeware"
- without support (or liability) in return for my years of pleasure
- with the Amiga. I hope it can be useful.
-
-
- *****************************************************************************
-
-
- **************************************
- ** TLPatch204 **
- *** Kenneth Jennings - 1994 ***
- *** Miami, Florida ***
- ** Internet: kenneth@daffy.aatech.com **
- **************************************
-
- The patch utility, itself patched, to handle the last library
- released (37.1) by Commodore with WB 2.04. It works on my Amiga
- and does no real goofy tricks to the system, so there's no reason
- why it shouldn't run on yours. Support is as follows: If it
- blows up your system causing you to reformat all your hard drives
- merely drop me a note via Email on the internet and I will send
- respond with mail saying I'm very sorry for what happened.
-
- These programs you are about to run are real programs, the names
- have been changed to protect the innocent. Where applicable use
- TLPatch204 and Translate204 in place of TLPatch and Translate,
- respectively.
-
- The TLPatch V1.0 source was (I assume) written for some version
- of the old Lattice C compiler. The new TLPatch204 source was
- tweaked to compile properly and without warnings for the SAS/C
- 6.51 compiler. If the makefile looks stupid I just have to say
- that I did this without the SAS/C manuals, since I left them at
- work which is a pretty idiotic place to keep them considering I
- don't use an Amiga at work. (YET!)
-
- I cleaned up the source (white space, hex values) in ways that
- are meaningful to me. If you don't like the way it looks, well,
- too bad. Phhhttttppp! I'm the one that fixed it. I also put in
- a bunch of debugging stuff, so you can see what the code is pro-
- cessing (if you really care) if you recompile with the DEBUG_ON
- flag #defined. The debugging output is written to the file
- tl.debug in RAM:.
-
- The only real major deviation between the logic in the two
- versions of TLPatch is that the original version mysteriously
- adds 2 to the size of the exception table when deciding if the
- table ends at WORD alignment. In reality, it's trying to align
- the end of the table to LONGs. Fortunately, the logic worked for
- the WB 1.3 Rel. 33.2 translator.library. It doesn't work for the
- new WB 2.04 Rel. 37.1 translator.library, so I fixed it. The size
- and data for the reloc32 hunk at the end of the file is also
- different.
-
-
- *****************************************************************************
-
-
- One of the unique features of the Amiga is its ability to
- translate english text into spoken audio. This is a two-stage
- process involving the Translate() function which converts the
- text into phonemes, and the Narrator device which uses the
- phonemes to synthesize the voice.
-
- Unfortunately, this feature appears to be underutilized, due
- perhaps to the many words which do not translate accurately.
- This program allows you to extract the exception table from the
- translator.library, and using a text editor, edit the table
- then restore it back into the library. It is meant to work
- primarily with version 33.2 of the library and will warn if it
- finds another one although that may or may not be fatal. It is
- definitely a hack, so it could really scramble the code, but
- since it creates the new library in ram: you'll have a chance to
- try it before replacing your working library. Programs that use
- the Translate() function such as SpeechToy and the SPEAK: device
- will receive a harmless error message from Translate() if the
- library is corrupt.
-
- USAGE:
- assign LIBS: RAM:
- TLPatch [-x]
-
- Where "-x" is used to extract the existing exception table
- from LIBS:translator.library and write it to ram:except.tbl
- adding linefeeds between the exceptions. This can be used if you
- wish to start with the original exception table or if you lose
- your working copy of except.tbl. Without the "-x" option, TLPatch
- will read except.tbl, which it expects to find in ram:, and create
- a new translator.library in ram:.
-
- The assignment command is necessary when you first begin the
- session if you wish to try the new library, otherwise speech
- programs will continue to use the library they found in LIBS: on
- disk. Subsequent invocations of TLPatch will free the library
- pointer so that your latest edited library is the valid one.
-
- EXCEPTIONS
-
- An exception consists of text on the left of an '=' sign and
- the resultant phonemes on the right. The text contains the actual
- characters to be converted which are surrounded by square
- brackets [], plus any leading or trailing characters whose context
- might effect the sound, and possibly substitution symbols which
- can match a variety of input strings. Upper-case is used for the
- input text and phonemes.
-
- For example:
-
- [AGO] =AHGOW2\
-
- Here all the input characters are translated and because the
- input text has a space before and after it, only the word "ago"
- will match this exception. If there were no spaces, "lagoon" would
- also match, since it contains "ago", which is not desired. This
- might be termed a "specific exception" as it fits a specific word.
-
- Numbers such as the '2' in the example above can be added in the
- phonetic string to add emphasis to vowels and dipthongs (not
- consonants). Values from 1 to 5 are common.
-
- [A]SION=EY3\
-
- There is no leading space so this is a general exception which
- will match all words ending "asion". Note that only the "a" part
- is translated, the remainder being handled elsewhere.
-
- #:[EA] =IYAH\
-
- These are the tricky ones, being sort of "rule-based" they
- match in cases where ANY vowel, consonant, etc. can occupy the
- position of its substitution symbol in the input text. They are
- tricky because if you create one, there may be words which you
- hadn't considered which match. You might also defeat words which
- had been correctly translated by creating an unforseen match.
- In the example above "idea", "area" or "panacea" all fit.
-
- The advantage of rule-based exceptions is that they keep
- the size of the library down by handling so many words.
-
- There are eight substitution symbols that I am aware of,
- they are ? ^ % + # : & and @. After studying the library and
- experimenting I believe they represent the following values:
-
- ? = numbers (0,1,2,3,4,5,6,7,8,9)
-
- e.g. ?[X]?= BAY` - as in "2x4" (the 'X' becomes "by")
-
- ^ = consonants (c,f,h,k,p,q,s,x)
-
- e.g. ^[AS]#=EYS\ - as in "CASE"
-
- % = vowels (e)
-
- e.g. [NGL]%=NXGUL\ - as in "ANGLE"
-
- + = vowels (e,i,y)
-
- e.g. [G]+=J\ - as in "AGE"
-
- # = vowels (a,e,i,o,u,y)
-
- e.g. [BUS]#=BIH3Z\ - as in "BUSY"
-
- : = anything except a,e,i,o,u,y including NULL or SPACE
-
- & = consonants (c,g,j,s,x,z)
-
- e.g. &[T]EN=\ - as in "LISTEN" (the 'T' is silent)
-
- @ = consonants (d,j,l,n,r,s,t,z)
-
- e.g. @[EW]=UW\ - as in "CREW","DEW" or "NEW"
-
- Exceptions always end with either a "\" or "`", I have not
- determined what difference it makes although the "\" is by far
- the most common.
-
- I've included a simple program called "Translate" to access
- the Translate() function. Usage from the CLI is:
-
- Translate <text>
-
- <text> is your input text and can be one word as in:
-
- Translate hello
-
- or a sentence in quotes as in:
-
- Translate "hello world"
-
- Also included is my latest translator.library and exception
- table, containing nearly 800 exceptions. Most notably corrections
- to numbers as well as month abbreviations (Jan. Feb. etc.). A date
- such as "1984" will read "nineteen eighty four" not "one nine eight
- four". A number like "27,543" is pronounced "twenty seven thousand
- five hundred and forty three" (the comma is important).
-
-
-
- TABLE OF PHONEMES
- (from RKM)
-
- Vowels -
-
- IY beet | IH bit | EH bet
- AE bat | AA hot | AH under
- AO talk | UH look | ER bird
- OH border | AX about | IX solid
-
- Dipthongs -
-
- EY made | AY hide | OY boil
- AW power | OW low | UW crew
-
- Consonants -
-
- R red | L yellow | W away
- Y yellow | M men | N men
- NX sing | SH rush | S sail
- TH thin | F fed | ZH pleasure
- Z has | DH then | V very
- J judge | CH check | /C loch
- /H hole | P put | B but
- T toy | D dog | G guest
- K could
-
- Special symbols -
-
- DX pity | Q kitten | QX pause
- RX car | LX call
-
- Contractions -
-
- UL = AXL | IL = IXL | UM = AXM
- IM = IXM | UN = AXN | IN = IXN
-
-